<div class="content">
<div class="grayBox">
Search results for "<?=$keyword?>"
<div class="pagination">
    <div class="paging">

        <?php 
        if(!$this->Paginator->first()){
        ?>
        <span class="arrowBg grayPrevFirst" href="#"></span>
        <?
        }
        echo $this->Paginator->first('<span class="arrowBg yellowPrevFirst"></span>', array('escape'=>false));
                                
        if($this->Paginator->hasPrev()){
            echo $this->Paginator->prev('<span class="arrowBg yellowPrev"></span>', array('escape'=>false));
        }
        else{
            echo $this->Paginator->prev('<span class="arrowBg grayPrev"></span>', array('escape'=>false));
        }
        ?>
        <?php echo $this->Paginator->numbers(array('first'=>1,'modulus'=>4, 'last'=>1));?>
        <?php 
            if($this->Paginator->hasNext()){
            
                echo $this->Paginator->next('<span class="arrowBg yellowNext"></span>', array('escape'=>false));
            }
            else{
                echo $this->Paginator->next('<span class="arrowBg grayNext"></span>', array('escape'=>false));
            }
        if(!$this->Paginator->last()){
        ?>
        <span class="arrowBg grayNextFirst"></span>
        <?
        }       
            echo $this->Paginator->last('<span class="arrowBg yellowNextFirst"></span>', array('escape'=>false));
        ?>
    </div>
    <a href="<?=$this->webroot.'products/add'?>" class="btnYellow01 btn"><span class="btnBg"><span class="iconAdd">Add Products</span></span></a>
</div>

<div class="detailList">
    <ul>
    <?
    $i=1;
    
    foreach($products as $post):
    ?>
        <li <?if($i%3==0) echo 'class="last"';?>>
            <?//debug($post);?>
            <div class="img" style="float:left;position:relative">
                <?=$html->image($thumb->image('posts/'.$post['Product']['image'],210,150));?>
            </div>
                <?//=$html->image($thumb->image('posts/testimonies/'.$post['Product']['image'],210,150));?>
            <div style="float:left; position:relative; width:77%; margin-left:10px;">
                <a href="<?=$this->webroot.'products/view/'.$post['Product']['id']?>" class="title" style="font-size:20px"><?=$post['Product']['name']?></a> by <?=$post['Manufacturer']['name']?>
                <p><?echo Sanitize::stripTags($post['Product']['description'])?></p>
                <div class="btnBox">
                    <p>
                        <a href="#" style="float:left; margin-left:75px">
                            <fb:like href="<?='http://'.$_SERVER['HTTP_HOST'].$this->webroot.'products/view/'.$post['Product']['id']?>" send="false" layout="button_count" width="450" show_faces="false" font=""></fb:like>
                        </a>
                    </p>                                    
                    <p style="padding-bottom: 10px; float:left">
                        <a href="http://twitter.com/share?text=#FCBC40UP <?=$post['Product']['name']?>" class="twitter-share-button" data-url="<?='http://'.$_SERVER['HTTP_HOST'].$this->webroot.'products/view/'.$post['Product']['id']?>" data-count="none">Tweet</a>
                        <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
                    </p>
                    <p style="float:left">
                        <?
                            echo '<a target="_blank" href="http://www.facebook.com/sharer.php?u=', urlencode('http://'.$_SERVER['HTTP_HOST'].$this->webroot.'products/view/'.$post['Product']['id']), '" share_url="http://'.$_SERVER['HTTP_HOST'].$this->webroot.'/products/view/'.$post['Product']['id'], '">
                                <img src="', $this->webroot, 'img/btnFShare.gif" alt="Facebook Share" />
                            </a>'
                        ?>
                    </p>
                </div>
            </div>
        </li>   
        <?
        $i++;
        endforeach;
        ?>
    </ul>
                        
</div>
<div class="pagination">
            <div class="paging">

        <?php 
        if(!$this->Paginator->first()){
        ?>
        <span class="arrowBg grayPrevFirst" href="#"></span>
        <?
        }
        echo $this->Paginator->first('<span class="arrowBg yellowPrevFirst"></span>', array('escape'=>false));
                                
        if($this->Paginator->hasPrev()){
            echo $this->Paginator->prev('<span class="arrowBg yellowPrev"></span>', array('escape'=>false));
        }
        else{
            echo $this->Paginator->prev('<span class="arrowBg grayPrev"></span>', array('escape'=>false));
        }
        ?>
        <?php echo $this->Paginator->numbers(array('first'=>1,'modulus'=>4, 'last'=>1));?>
        <?php 
            if($this->Paginator->hasNext()){
            
                echo $this->Paginator->next('<span class="arrowBg yellowNext"></span>', array('escape'=>false));
            }
            else{
                echo $this->Paginator->next('<span class="arrowBg grayNext"></span>', array('escape'=>false));
            }
        if(!$this->Paginator->last()){
        ?>
        <span class="arrowBg grayNextFirst"></span>
        <?
        }       
            echo $this->Paginator->last('<span class="arrowBg yellowNextFirst"></span>', array('escape'=>false));
        ?>
    </div>
</div>
</div></div>
